<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <link rel="stylesheet" href="__PUBLIC__/member/style/common.css" media="screen"/>
        <script type="text/javascript" src="__PUBLIC__/common/js/jquery.js"></script>
        <script type="text/javascript" src="__PUBLIC__/common/js/common.js"></script>
        <script type="text/javascript" src="__PUBLIC__/pano/pano.js"></script>
        <script type="text/javascript" src="__PUBLIC__/common/js/jscolor/jscolor.js"></script>
        {:W("Easyui")}
        {:W("Boluoui")}
        {:W("Uploader")}
        <script type="text/javascript">
            function checksb(){
                var result = true;
                if(result == true){
                    result = AutoCheckSub(".cs");
                }
                if(result == true){
                    var target_id = $("#target_id").val();
                    if(target_id == "0"){
                        showMsg("请选定目标场景！");
                        result = false;
                    }
                }
                return result;
            }

            $(document).ready(function(){
                onoroff();
                boluo_autocheckui();
            });

        </script>
        <style type="text/css">
            .action_left{
                width: 140px; min-height: 200px; overflow: hidden; float: left;
            }
            .action_myphoto{
                width: 120px; height: auto; overflow: hidden; border:1px solid #dbdbdb;
                box-shadow:2px 2px 4px #e2e2e2; margin: 0 auto; margin-bottom: 12px;
            }
            .action_mytext{
                width: auto; height: 22px; overflow: hidden; text-align: left; font: 12px/22px "微软雅黑"; color: #333; cursor: default;
            }
            .action_right{
                width: auto; min-height: 200px; overflow: hidden; float: left;
            }
            .mypano{
                width: 600px; height: 400px; overflow: hidden; border:1px solid #ccc;
            }
            .mypano.over{
                border-color: #C00;
            }
        </style>
        <script type="text/javascript">
            $(function(){

            });
            function intdata(){
                var ath = $("#ath").val();
                var atv = $("#atv").val();
                var mysize = $("#size").val();
                mysize = mysize/100;
                var myblind = $("#blind").val();
                myblind = myblind/100;
                var myblindcurve = $("#blindcurve").val();
                var krpano = document.getElementById("krpano");
                krpano.call("set(lensflare[flare].atv,"+atv+")");
                krpano.call("set(lensflare[flare].ath,"+ath+")");
                krpano.call("set(hotspot[introimage].atv,"+atv+")");
                krpano.call("set(hotspot[introimage].ath,"+ath+")");
                atv = parseFloat(atv);
                if(atv<0){
                    var lookatv = atv + 20;
                    if(lookatv>0){
                        lookatv = 0;
                    }
                }else{
                    var lookatv = atv - 20;
                    if(lookatv<0){
                        lookatv = 0;
                    }
                }   
                krpano.call("set(view.vlookat,"+atv+")");
                krpano.call("set(view.hlookat,"+ath+")");
                krpano.call("set(lensflare[flare].size,"+mysize+")");
                krpano.call("set(lensflare[flare].blind,"+myblind+")");
                krpano.call("set(lensflare[flare].blindcurve,"+myblindcurve+")");
            }
            function postaplha(data){
                var krpano = document.getElementById("krpano");
                var realdata = data/100;
                krpano.call("set(lensflare[flare].size,"+realdata+")");
            }
            function postblind(data){
                var krpano = document.getElementById("krpano");
                var realdata = data/100;
                krpano.call("set(lensflare[flare].blind,"+realdata+")");
            }
            function postblindcurve(data){
                var krpano = document.getElementById("krpano");
                var realdata = data;
                krpano.call("set(lensflare[flare].blindcurve,"+realdata+")");
            }
            function shoot(h,v){
                $("#ath").val(h);
                $("#atv").val(v);
            }
        </script>
    </head>
    <body>
        {:W("Bg")}
        <div id="upmain">
            <div class="main">
                <div class="main_head">
                    <div class="main_head_left"></div>
                    <div class="main_head_right"></div>
                    <div class="main_head_main">
                        <div class="title">全景项目 - {$panorow['title']}</div>
                        <div title="关闭" onclick="DoNote('确认返回功能首页？','{:U('main/index')}');" class="close"></div>
                        <div title="返回上级" onclick="LinkTo('{$backurl}');" class="goback"></div>
                    </div>
                </div>
                <div class="main_mid">
                    <div class="main_mid_left"></div>
                    <div class="main_mid_right"></div>
                    <div class="main_mid_main">
                        <div class="pano_menu">
                            {:W("Panomenu",array("pano_id"=>$pano_id,"num"=>7))}
                        </div>
                        <div class="none_main">
                            <div class="action_main">
                                <div class="action_title"><a href="{$backurl}">全景特效（镜头光晕）</a> - 【{$viewrow['title']}】- 设置</div>
                                <div class="action_web">
                                    <div class="action_left">
                                        <div class="action_myphoto"><img src="{:CC('web_root')}{$viewrow['thumb']}" onload="swichimg2w(this,120);"/></div>
                                        <div class="action_mytext"><b>当前场景：</b>{$viewrow['title']}</div>
                                    </div>
                                    <div class="action_right">
                                        <form name="form1" action="" onsubmit="return checksb();" enctype="multipart/form-data" method="post">
                                            <input type="hidden" name="dopost" value="save" />
                                            <input type="hidden" name="view_id" id="view_id" value="{$view_id}" />
                                            <input type="hidden" name="len_id" id="len_id" value="{$len_id}" />
                                            <input type="hidden" id="ath" name="ath" value="{$lenrow['ath']}" />
                                            <input type="hidden" id="atv" name="atv" value="{$lenrow['atv']}" />
                                            <div class="mypano" id="mypano"></div>
                                            <script type="text/javascript">
                                                embedpano({
                                                    id:"krpano",
                                                    swf:"__PUBLIC__/pano/pano.swf",
                                                    xml:"{:U('lensflarexml',array('view_id' => $view_id))}",
                                                    target:"mypano",
                                                    html5:"auto",wmode:"transparent"
                                                });
                                            </script>
                                            <table width="100%" border="0" cellpadding="4" cellspacing="1" align="center">
                                                <tr class="tr_white" height="36">
                                                    <td colspan="2">
                                                        <font color="#008800"><b>提示：</b>点中光晕中心可以拖动，设置光晕位置！</font>
                                                    </td>
                                                </tr>
                                                <tr class="tr_white" height="36">
                                                    <td align="right" width="80"><b>光晕大小：</b></td>
                                                    <td align="left">
                                                        <input class="easyui-slider" style="width:200px" name="size" id="size" value="{$lenrow['size']}"
                                                               data-options="showTip:true,
                                                               max:200,
                                                               tipFormatter: function(value){
                                                                    return value+'%';
                                                               },
                                                               onChange:function(value){
                                                                    postaplha(value);
                                                               }"
                                                               />
                                                    </td>
                                                </tr>
                                                <tr class="tr_white" height="36">
                                                    <td align="right" width="80"><b>曝光强度：</b></td>
                                                    <td align="left">
                                                        <input class="easyui-slider" style="width:200px" name="blind" id="blind" value="{$lenrow['blind']}"
                                                               data-options="showTip:true,
                                                               tipFormatter: function(value){
                                                                    return value+'%';
                                                               },
                                                               onChange:function(value){
                                                                    postblind(value);
                                                               }"
                                                               />
                                                    </td>
                                                </tr>
                                                <tr class="tr_white" height="36">
                                                    <td align="right" width="80"><b>曝光区间：</b></td>
                                                    <td align="left">
                                                        <input class="easyui-slider" style="width:200px" name="blindcurve" id="blindcurve" value="{$lenrow['blindcurve']}"
                                                               data-options="showTip:true,
                                                               max: 8,
                                                               onChange:function(value){
                                                                    postblindcurve(value);
                                                               }"
                                                               />
                                                    </td>
                                                </tr>
                                                <tr class="tr_white" height="80">
                                                    <td colspan="2">
                                                        <input type="submit" class="blackbutton" value="提交" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="main_foot">
                    <div class="main_foot_left"></div>
                    <div class="main_foot_right"></div>
                    <div class="main_foot_main"></div>
                </div>
            </div>
        </div>
    </body>
</html>
